Previous Book Contents Book Index Next

Inside Macintosh: Programming With JManager /
Chapter 2 - JManager Reference / JManager Functions
Text Handling Functions /


JMGetTextBytes

Retrieves characters in a text object in the appropriate text encoding.

OSStatus JMGetTextBytes (
const JMTextRef textRef,
JMTextEncoding dstEncoding,
void* textBuffer,
UInt32 textBufferLength,
UInt32* numCharsCopied);
textRef
The text object containing the string to retrieve.
dstEncoding
The text encoding you want to use for the string.
textBuffer
A pointer to a buffer. on return, this parameter is the retrieved string.
textBufferLength
The length of the buffer, in bytes.
numCharsCopied
A pointer to an integer. On return, this parameter is the actual length of the string retrieved, in characters.
function result
A result code; see "JManager Result Codes".
DISCUSSION
The number of characters retrieved is dependent on the size you specify for the buffer as well as on the text encoding. For example, Unicode characters can take 2 bytes per character.

SEE ALSO
The JMNewTextRef function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
10 DEC 1997